package com.example.quartz.common.base;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.util.Date;

/**
 * @description:
 * @author: wlp
 * @createDate: 2020-01-08
 * @version: 1.0
 */
@SuperBuilder
@Setter
@Getter
public abstract class BaseBean implements Serializable {

    @TableField(value = "id")
    @ApiModelProperty(value = "id")
    private Long id;

    @TableField(value = "create_user_id", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "createUserId", hidden = true)
    private Long createUserId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "createTime", hidden = true)
    private Date createTime;

    @TableField(value = "modify_user_id", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "modifyUserId", hidden = true)
    private Long modifyUserId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "modify_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "modifyTime", hidden = true)
    private Date modifyTime;

    @TableField(value = "del_flag")
    @ApiModelProperty(value = "delFlag", hidden = true)
    private Boolean delFlag;
}
